﻿CREATE VIEW [dbo].[ETL_V_DtSourceDataIdentity]
	AS 
	SELECT DI.*,
	SC.Name as DtSourceColumnName,
	SC.DataType as DtSourceColumnType,
	TC.Name as DtTableColumnName,
	TC.[Type]  as DtTableColumnType,
	TC.Length as DtTableColumnLength
	 FROM ETL_DtSourceDataIdentity as DI
	inner join ETL_DtSourceColumn as SC on SC.Id = DI.DtSourceColumnId
	inner join ETL_DtSourceColumnMapping as SCM on SCM.DtSourceColumnId = SC.Id
	inner join ETL_DtTableColumn as TC on TC.Id = SCM.DtTableColumnId
